package chapter3.No3_1_等待和通知机制.l通过管道进行线程间通信_字符流;

import java.io.PipedWriter;

/**
 * Created by Administrator on 2016/11/20.
 */
public class ThreadWrite extends Thread {
    WriteData writeData;
    PipedWriter pipedWriter;

    public ThreadWrite(WriteData writeData, PipedWriter pipedWriter) {
        this.writeData = writeData;
        this.pipedWriter = pipedWriter;
    }

    @Override
    public void run() {
        writeData.writeMethod(pipedWriter);
    }
}
